<form id="frmModal" name="frmModal" method="post">
<h3 class="dialog_title"><span>History Penilaian :: <?php echo $kary_nama?></span></h3>
<div class="dialog_content" style="width: 800px">
<div style="border-bottom: 1px solid #CCC; padding: 10px" >
<table width="100%" border="0" cellpadding="5" cellspacing="0" class="zebraable">
	<tr class="header">
		<td>Tanggal Pengesahan</td>
		<td>Tanggal Lapor</td>
		<td>Kategori</td>
		<td>Point</td>
		<td></td>
	</tr>
	<?php $CI =& get_instance()?>
	<?php $CI->load->model(array('perbuatan_model','karyawan_model','karyawan_history_jabatan_model',
								'detachievement_model','ranking_model'))?>
	<?php $zebra=0?>
	<?php $totalPoint=0?>
	<?php //point periode sebelumnya
		$year=date("Y",strtotime($periodeStart));
    	$month=date("m",strtotime($periodeStart))-1;
    	$lastMonthPoint = $CI->ranking_model->getPoint($kary_id, "$year-$month-01");
    ?>
    <tr <?php if ($zebra++%2==1):?> class="zebra" <?php endif?> >
		<td colspan="3">Point Bulan: <?php echo "$year-$month"?></td>
		<td><?php echo $lastMonthPoint; $totalPoint+=$lastMonthPoint?></td>
		<td align="right" width="10%"></td>
	</tr>
	<?php foreach($penilaianData->result_array() as $row):?>
	<tr <?php if ($zebra++%2==1):?> class="zebra" <?php endif?> 
		onmouseover="$(this).getElements('input[class:buttonSmall]').setStyle('visibility','visible')"
		onmouseout="$(this).getElements('input[class:buttonSmall]').setStyle('visibility','hidden')">
		<td><?php echo date("Y-m-d", strtotime($row['point_tgl_aktif']))?></td>
		<?php $perbData = $CI->perbuatan_model->select_by_id($row['perb_id'])?>
		<?php $perbData = $perbData->row()?>
		<td><?php echo date("Y-m-d", strtotime($perbData->perb_tgl_lapor))?></td>
		<?php $detachievData = $CI->detachievement_model->select_by_id($row['detachiev_id'])?>
		<?php $detachievData = $detachievData->row()?>
		<td><?php echo $detachievData->detachiev_nama?> 
			[<?php echo $jenis_options[$detachievData->achiev_jenis]?>, 
			<?php echo $tingkat_options[$detachievData->detachiev_tingkat]?>]</td>
		<td><?php echo $row['point_point']; $totalPoint+=$row['point_point']?></td>
		<td align="right" width="10%">
			<input class="buttonSmall" type="button" style="font-size: 14px; visibility:hidden;" value=">" 
				onclick="" />
		</td>
	</tr>
	<?php endforeach?>
	<tr class="header">
		<td colspan="3" align="right">Total Point</td>
		<td><?php echo $totalPoint?></td>
		<td></td>
	</tr>
</table>
</div>
<div class="dialog_buttons" style="padding: 12px 10px">
	<input class="button" type="button" value="Close" onclick="FBModal_hide()" />
</div>
</div>
</form>